<div class="open-form">
  <div class="open-model">
    <div class="open-auto">
      <button class="layui-btn" id="isCheckFun" style="border-radius: 4px;margin-bottom: 10px">确认选择</button>
      <table id="warehouseProductBrandForm"></table>
    </div>
    <div class="layui-form-item text-right">
      <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">关闭</button>
    </div>
  </div>
</div>
<script>
  layui.use(['layer', 'form', 'table', 'admin', 'upload', 'tree', 'laytpl'], async function () {
    var $ = layui.jquery;
    var layer = layui.layer;
    var form = layui.form;
    var table = layui.table;
    var config = layui.config;
    const nowData = {...parentData}
    let cacheList = nowData.cacheList
    table.render({
      elem: '#warehouseProductBrandForm',
      url: config.base + `warehouse/warehouse/productBrand/list`,
      where: {notInListIds: nowData.notInListIds},
      page: true,
      cellMinWidth: 100,
      cols: [[
        {field: 'code', align: 'center', title: '品牌编码', width: 150}
        , {field: 'name', align: 'center', title: '品牌名称', width: 150}
        , {field: 'remark', align: 'center', title: '备注'}
        , {field: 'sortNumber', align: 'center', title: '排序'}
        , {field: 'no', align: 'center', title: '编码序号'}
        ,{field: 'logo', align: 'center', title: '仓库照片'}
        // , {field: 'creatorName', align: 'center', title: '创建人', width: 140}
        // , {field: 'createTime', align: 'center', title: '创建时间', width: 180}
        , {align: 'center', toolbar: '#warehouseTableBar', title: '操作', width: 150, fixed: 'right'}
      ]]
    });
    $('#isCheckFun').click(() => {
      var checkStatus = table.checkStatus('warehouseProductBrandForm');

      var data = checkStatus.data;  // 选中的数据
      if (typeof parent.layui !== 'undefined') {
        childData.list = data.map(v => {
          v.productDetailId = v.id;
          v.warehousePrice = 1.03;
          delete v.id
          return v
        })
        console.log('childData', data)
        layer.close(parentData.zindex); // 关闭指定的弹窗
      }
    })

  })
</script>